/*
 * This is a command line interface for configuring max2829 and testing purpose.
 * USART0 is used for the user interface while spi is used to configure max2829's register.
 * Using TAB for the auto-completion of commands is supported.
 * autor: nemo(nemokingdom@gmail.com) <xjtu>.
 * date: Feb.9th,2009.
 * -all rights reserved-.
 */
#include <iom128v.h>
#include <macros.h>

#include "serial.h"
#include "command.h"
#include "global.h"
#include "spi.h"

#define MAX_SIZE 200
void main()
{
    char c,line[MAX_SIZE];
	uint32 i;
	init_devices();
	delay_n_us(10000);
	set_register(11,19600,1);
	print("\r\n--2829 configure program--\r\n");
	print("*type \"list\" for a list of commands*\r\n");
	print("*use TAB for autocompletion of the commands*\r\n$okidogi>");
	for(;;){
	    readline(line);
	    parse_and_run(line);
		print("$okidogi>");
	}
    return;
}
